The present invention relates to a method for code conversion, and in particular, to the conversion of codes used by applications.
As business relationships integrate, more organizations in all industries (e.g., consumer goods, electronics, health, automotive, transportation, government) exchange data electronically. Due to the expeditious movement and accuracy of electronically transmitted data, overall costs and business cycle times are reduced, and productivity and customer service and satisfaction are improved. The electronically communicated data, formerly seen only in paper documents, typically represents standard transactions used in all business cycles, such as pre-order business, procurement/order fulfillment, forecasting, shipping, financial/payment, quality data, environmental data reporting, even government and tax reporting. Usually these transactions are very routine and occur in high volume, e.g. purchase orders, invoices, payments, forecasts, resale and inventory reports. Upon receipt of the electronically communicated data, the receiving party interprets the data to extract data needed to conduct business. Organizations which electronically exchange data in the above manner are called xe2x80x9ctrading partnersxe2x80x9d. The entire process surrounding the movement of data representing standard transactions is called Electronic Data Interchange (EDI).
Data can be exchanged in proprietary formats, which the trading partners must agree upon. Usually the proprietary formats are designed by one of the trading partners. However, data is exchanged more efficiently if exchanged in a universally recognized format referred to as xe2x80x9cEDI standardsxe2x80x9d.
Two universally recognized standards are the ASC X12 and UN/EDIFACT standards. For various electronic transactions, EDI standards define a structure (physical layout) and syntax for data. In addition, each standard provides a data dictionary that defines data elements, and, if appropriate for a particular data element, a set of codes representing various values of the data element.
For example, the ASC X12 Purchase Order transaction defines data segments or records, and the order to the data segments. The data segments consists of data elements, some of which may contain pre-defined codes. For example, one data element, a date element, represents a generic date. A second data element, a data/time qualifier, precedes the date element. The date/time qualifier indicates the type of date represented by the date element (e.g. delivery date, ship date, or many other types of date). Definitions of electronic transactions, using the EDI standards, make it possible for all trading partners to consistently interpret the business data.
Need for Code Conversion
An organization often defines for their own internal applications a set of codes (xe2x80x9cinternal application codesxe2x80x9d) that differ from externally recognized sets of codes (xe2x80x9cexternal codesxe2x80x9d), such as those prescribed by EDI standards, or those defined by trading partners. In order to electronically exchange data, it is often necessary to convert internal application codes to externally recognized codes.
For example, the code xe2x80x98EACHxe2x80x99 may be used to represent the unit of measure xe2x80x98eachxe2x80x99 in an internal business application. However, the unit of measure xe2x80x98eachxe2x80x99 is represented by xe2x80x98EAxe2x80x99 in the ASC 12 standard, or xe2x80x98PCxe2x80x99 in the UN/EDIFACT standard, or may be represented by xe2x80x98PIECExe2x80x99 by a particular trading partner to their internal application.
Code conversion is not limited to converting one single code to another single code (xe2x80x9cone-to-one code conversionxe2x80x9d). Sometimes, one code is converted into several codes or values (xe2x80x9cone-to-many code conversionxe2x80x9d), or several codes or values are converted into one code (xe2x80x9cmany-to-one code conversionxe2x80x9d). For example, consider the code xe2x80x9cNET 10/20xe2x80x9d, which represent payment terms meaning 10% discount if paid in 20 days. In a one-to-many code conversion, the code xe2x80x9cNET 10/20xe2x80x9d may be converted to the values xe2x80x9c0.10xe2x80x9d and xe2x80x9c20xe2x80x9d. In a many-to-one code conversion the values, xe2x80x9c0.10xe2x80x9d and xe2x80x9c20xe2x80x9d may need to be converted to xe2x80x9cNET 10/20xe2x80x9d.
Traditional Processing of Outbound EDI Transactions
Referring to FIG. 1, computer system 104 is controlled by trading partner A. Data resides in the application 108. An interface program 110 extracts the data from the application and optionally performs code conversion. Eventually the data is received by their EDI Translator 120.
Software for EDI Translators is usually purchased. The EDI translator performs many standard procedures for processing EDI transactions. It monitors EDI activity for a company, defines trading partnerships, tracks which transactions are processed and the particular EDI standard followed by a given trading partner. The EDI translator also formats data to a particular EDI standard.
Communication software 132 receives data from EDI translator 120 and transmits the data to a trading partner. The communication software 132 may transmit the data across any type of communication mechanism, such as third party networks (including the Internet) and internal networks.
To illustrate the process for an outbound transaction, the following example is provided. Application 108 has a data element containing the code xe2x80x98EACHxe2x80x99 representing a unit of measure of a purchase order item. However, the ASC X12 standard specifies that the code for the same unit or measure is xe2x80x98EAxe2x80x99, and the EDIFACT standard specifies xe2x80x98PCxe2x80x99. So interface program 110 converts the code xe2x80x98EACHxe2x80x99 to xe2x80x98EAxe2x80x99 and xe2x80x98PCxe2x80x99, and writes the codes to an interface file. The interface file is sent to the EDI Translator 120. The EDI Translator 120 will choose the X12 code xe2x80x98EAxe2x80x99 for trading partners using the X12 standard, and the EDIFACT code xe2x80x98PCxe2x80x99 for trading partners using the EDIFACT standard when it writes data for the standard transaction. Data for standard transactions are communicated to the appropriate trading partner through communication software 132, using a communication mechanism of choice.
Traditional Processing of Inbound EDI Transactions
Referring to FIG. 1, computer system 150 is controlled by the second trading partner B. The inbound EDI transaction process is performed in the reverse order of the outbound EDI transaction process noted above. Data for inbound EDI transactions is received from trading partners through a communication mechanism of choice by a communication process 134. After communication process 134 receives the data, the first process to handle the data is EDI Translator 140.
The EDI Translator usually writes the received data to a file in a format suited for interface program 145. Interface program 145 may then convert codes contained in the file. When all processes are successfully completed, the data is loaded into the applications 160.
To illustrate this inbound process, the following example is provided. The inbound process is the reverse of the outbound EDI process. The trading partner B receives data as an ASC X12 purchase order transaction. The data is received from a trading partner through the communication mechanism of choice by communication process 134. When the data is received by the EDI Translator 140, EDI translator recognizes the X12 unit of measurement code xe2x80x98EAxe2x80x99. The EDI translator writes the data to an interface file for interface program 145. The interface program 145 converts the X12 code xe2x80x98EAxe2x80x99 to the corresponding code used by application 160, which is xe2x80x98PIECExe2x80x99. Data for the purchase order transaction is then loaded into the application 160. Note that the sending party""s code conversion of xe2x80x98EAxe2x80x99 does not match the receiving party""s code conversion result. One party used xe2x80x98EACHxe2x80x99 while the other party used xe2x80x98PIECExe2x80x99. Their use of the data is same. Specifically, both use their own respective codes to represent the same unit of measurement, i.e. the unit of measure that conveys a single unit
Where to Perform Code Conversion
Code conversion can be applied in one or more of the following mechanisms:
EDI Translator software using scripting languages interpreted by EDI Translators.
Proprietary software that resides between the EDI translator and the application of the trading partner, or resides with the application.
Applying code conversion in EDI translators using scripting languages or in proprietary software requires the development of customized software. One disadvantage of developing customized software is the high cost of development. For example, there is the cost of the development staff or temporary consultants to develop the customized programs. The development process can require substantial resources to document user requirements, high level designs, detail level designs, coding, testing, implementation, as well as writing system and user documentation. After implementation, the programs must be maintained and changes may be required. Over the life of the customized software, maintenance costs may be substantial.
It is often desirable to avoid custom programs due to substantial costs. It is therefore desirable to provide a method of converting codes without the necessity for developing programs customized to convert codes.
A method and apparatus for converting codes between applications is described. User defined conversion rules are applied to either convert an internal code into one or more external codes, or to convert one or more external codes into an internal code. Each code conversion rules specifies the conversion between an internal value and one or more external values, and may specify criteria that is met before the code conversion rule is applied.
According another aspect of the invention, a set of code conversion rules are associated with a user defined code conversion category. The code category may be assigned to one or more fields. When a code is being converted for the field, a conversion rule associated with the code category is applied to convert the code.
According to another aspect of the invention, one or more user specified search key values define criteria for a code conversion rule that are met before the code conversion rule is applied. A user specifies fields that supply values to associate with codes that are being converted. The supplied values are compared with the search key values associated with a code conversion rule to determine which the particular code conversion rule to applies.